package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbAdoptionapplicationMapper;
import com.ruoyi.system.domain.TbAdoptionapplication;
import com.ruoyi.system.service.ITbAdoptionapplicationService;

/**
 * 宠物申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-08
 */
@Service
public class TbAdoptionapplicationServiceImpl implements ITbAdoptionapplicationService 
{
    @Autowired
    private TbAdoptionapplicationMapper tbAdoptionapplicationMapper;

    /**
     * 查询宠物申请
     * 
     * @param id 宠物申请主键
     * @return 宠物申请
     */
    @Override
    public TbAdoptionapplication selectTbAdoptionapplicationById(Long id)
    {
        return tbAdoptionapplicationMapper.selectTbAdoptionapplicationById(id);
    }

    /**
     * 查询宠物申请列表
     * 
     * @param tbAdoptionapplication 宠物申请
     * @return 宠物申请
     */
    @Override
    public List<TbAdoptionapplication> selectTbAdoptionapplicationList(TbAdoptionapplication tbAdoptionapplication)
    {
        return tbAdoptionapplicationMapper.selectTbAdoptionapplicationList(tbAdoptionapplication);
    }

    /**
     * 新增宠物申请
     * 
     * @param tbAdoptionapplication 宠物申请
     * @return 结果
     */
    @Override
    public int insertTbAdoptionapplication(TbAdoptionapplication tbAdoptionapplication)
    {
        return tbAdoptionapplicationMapper.insertTbAdoptionapplication(tbAdoptionapplication);
    }

    /**
     * 修改宠物申请
     * 
     * @param tbAdoptionapplication 宠物申请
     * @return 结果
     */
    @Override
    public int updateTbAdoptionapplication(TbAdoptionapplication tbAdoptionapplication)
    {
        tbAdoptionapplication.setUpdateTime(DateUtils.getNowDate());
        return tbAdoptionapplicationMapper.updateTbAdoptionapplication(tbAdoptionapplication);
    }

    /**
     * 批量删除宠物申请
     * 
     * @param ids 需要删除的宠物申请主键
     * @return 结果
     */
    @Override
    public int deleteTbAdoptionapplicationByIds(Long[] ids)
    {
        return tbAdoptionapplicationMapper.deleteTbAdoptionapplicationByIds(ids);
    }

    /**
     * 删除宠物申请信息
     * 
     * @param id 宠物申请主键
     * @return 结果
     */
    @Override
    public int deleteTbAdoptionapplicationById(Long id)
    {
        return tbAdoptionapplicationMapper.deleteTbAdoptionapplicationById(id);
    }
}
